package org.noidler.demo;

import org.noidler.model.AnyThing;

import java.util.Map;

public class AnythingBuilder {

    private final AnyThing thing = new AnyThing();

    private AnythingBuilder() {

    }

    public static AnythingBuilder builder() {
        return new AnythingBuilder();
    }

    public AnyThing build() {
        return thing;
    }

    public AnythingBuilder withId(String id) {
        thing.setId(id);
        return this;
    }

    public AnythingBuilder withName(String name) {
        thing.setName(name);
        return this;
    }

    public AnythingBuilder withDescription(String description) {
        thing.setDescription(description);
        return this;
    }

    public AnythingBuilder withCode(String code) {
        thing.setCode(code);
        return this;
    }

    public AnythingBuilder withConditionType(String conditionType) {
        thing.setConditionType(conditionType);
        return this;
    }

    public AnythingBuilder withParams(Map<String, Object> params) {
        thing.setParams(params);
        return this;
    }
}
